import { defHttp } from '/@/utils/http/axios';

enum Api {
  AddCorpType = `/web/system/industry/add`,
  DelCorpType = '/web/system/industry/delete/{id}',
  GetCorpTypeInfo = '/web/system/industry/detail/{id}',
  UpdateCorpType = '/web/system/industry/edit',
  GetCorpTypeList = '/web/system/industry/list',
  UpdateCorpTypeStatus = '/web/system/industry/status/change/{id}',

  AddCorp = '/web/system/tenant/add',
  DelCorp = '/web/system/tenant/delete/{id}',
  GetCorpInfo = '/web/system/tenant/detail/{id}',
  UpdateCorp = '/web/system/tenant/edit',
  GetCorpList = '/web/system/tenant/list',
  UpdateCorpStatus = '/web/system/tenant/status/change/{id}',
}

/**
 * @description: 新增企业类别
 */
export function addCorpType(params: any) {
  return defHttp.post<any>({
    url: Api.AddCorpType,
    params,
  });
}
/**
 * @description: 删除企业类别
 */
export function delCorpType(params: any) {
  return defHttp.post<any>({
    url: Api.DelCorpType,
    params,
  });
}
/**
 * @description: 获取企业类别
 */
export function getCorpTypeInfo(params: any) {
  return defHttp.get<any>({
    url: Api.GetCorpTypeInfo,
    params,
  });
}

/**
 * @description: 更新企业类别
 */
export function updateCorpType(params: any) {
  return defHttp.post<any>({
    url: Api.UpdateCorpType,
    params,
  });
}

/**
 * @description: 获取企业类别列表
 */
export function getCorpTypeList(params: any) {
  return defHttp.post<any>({
    url: Api.GetCorpTypeList,
    params,
  });
}

/**
 * @description: 更新企业类别状态
 */
export function updateCorpTypeStatus(params: any) {
  return defHttp.post<any>({
    url: Api.UpdateCorpTypeStatus,
    params,
  });
}

/**
 * @description: 新增企业
 */
export function addCorp(params: any) {
  return defHttp.post<any>({
    url: Api.AddCorp,
    params,
  });
}
/**
 * @description: 删除企业
 */
export function delCorp(params: any) {
  return defHttp.post<any>({
    url: Api.DelCorp,
    params,
  });
}
/**
 * @description: 获取企业
 */
export function getCorpInfo(params: any) {
  return defHttp.get<any>({
    url: Api.GetCorpInfo,
    params,
  });
}

/**
 * @description: 更新企业
 */
export function updateCorp(params: any) {
  return defHttp.post<any>({
    url: Api.UpdateCorp,
    params,
  });
}

/**
 * @description: 获取企业列表
 */
export function getCorpList(params: any) {
  return defHttp.post<any>({
    url: Api.GetCorpList,
    params,
  });
}

/**
 * @description: 更新企业状态
 */
export function updateCorpStatus(params: any) {
  return defHttp.post<any>({
    url: Api.UpdateCorpStatus,
    params,
  });
}
